1. Field of the Invention
The embodiment of the present invention relates generally to an improved data processing system and in particular to a computer implemented method and apparatus for processing application code. More particularly, the embodiment of the present invention is directed to a computer implemented method, apparatus, and computer usable program product for enforcing abstract processes on web applications using annotated application code.
2. Description of the Related Art
Application logic is the computational aspects of an application, including a list of instructions that tells a software application how to operate. Application logic may be thought of as a collection of operations that may be invoked by a user. In some instances, for software applications to function properly, the operations may be required to be invoked in a particular order. This requirement is particularly relevant to software applications operable by human users. For example, a software application for a retail website may include operations for displaying a list of retail items for a user's review, for enabling a user to place a selected retail item into a virtual shopping cart, and for checking out. In this example, the user of the online retail website would be unable to check out without having first placed a retail item into the virtual shopping cart. Thus, enforcing an order for calling the operations of the software application for the retail website allows the underlying software application to function properly.
Sequencing constraints are rules that limit the order in which the operations of a software application may be called. One currently used method for introducing sequencing constraints is the use of a workflow programming model. A workflow programming model provides the sequencing of operations of an underlying software application. An example of a workflow programming model is WS-BPEL. However, a notable problem regarding the use of a workflow programming model is the limited applicability to other applications types and domains. For example, different types of software applications may benefit from specialized programming models. Consequently, a unique programming model may not adequately address the requirements of all application types and domains.
Another currently used method for introducing sequencing constraints involves the integration of a continuation capability in the programming language. This capability is provided by Cocoon FlowScript, which is available from the Apache Software Foundation. Cocoon implements a sequential programming model that enables the identification of certain steps of code as “continuations.” The continuations are associated with a specific user action. The sequential nature of the code enforces the sequence of user interactions with the software. A common problem associated with Cocoon is that the Cocoon model is tied to one specific programming model. As such, Cocoon has no general applicability to other more common models, such as standard object oriented development.
The use of a separately defined process representation that refers to operations written in a lower level programming language is yet another currently used method for introducing sequencing constraints. This method involves the use of metadata external to the application logic that may be processed to limit the order in which operations may be called. This capability may be provided by Spring WebFlow, an open source project, which is available from SpringSource. However, this approach involves the use of external metadata, which requires maintaining additional artifacts external to the application code. Notably, Spring WebFlow introduces additional complexity to the development and update of processes.